{% extends 'base.html' %}
<!--{% include 'right.html' %}-->
{% block content %}
您的位置：<a itemprop="" href="{% url 'index' %}">首页</a> > <span class="current">{{cname}}</span>


{% comment %}
分类
{% endcomment %}
<h4 class="post-left-title"> 分类：{{cname}}</h4>


{% comment %}
文章列表
{% endcomment %}

{% for list in list %}
<div class="article-box clearfix excerpt-1">
    <div class="col-md-4">
        <div class="thumbnail">
            <a href="{% url 'index' %}show-{{ list.id }}.html" title="{{ list.title }}">
                <img src="media/{{ list.img }}"
                     srcset="media/{{ list.img }}"
                     alt="{{ list.title }}" class="wp-post-image" width="240" height="160"/></a>
        </div>
    </div>
    <div class="col-md-8">
        <h2><a href="{% url 'index' %}show-{{ list.id }}.html" target="_blank"
               title="{{ list.title }}">{{ list.title }}</a></h2>
        <p class="txtcont hidden-xs"><a href="{% url 'index' %}show-{{ list.id }}.html"
                                        target="_blank"
                                        title="{{ list.title }}">{{ list.excerpt }}</a></p>
        <div class="meta"><span class="label label-info"><a
                href="{% url 'index' %}list-{{ list.category_id }}.html">{{ list.category.name }}</a></span>
            <time class="item"><i
                    class="fa fa-clock-o"></i>{{ list.created_time}}
            </time>
        </div>
    </div>
</div>
{% endfor %}

{% comment %}
分页
{% endcomment %}
<div class="pagination">
    <ul>
        {% if list.has_previous %}
        <li class="prev-page"><a href="?page={{list.previous_page_number}}">上一页</a></li>
        {% else %}
        <li class="pre-page"></li>
        {% endif %}

        {% for num in list.paginator.page_range %}
        {% if num %}
        {% if num == list.number %}
        <li class="active"><span>{{num}}</span></li>
        {% else %}
        <li><a href="?page={{num}}">{{ num }}</a></li>
        {% endif %}
        {% else %}
        <li class="disable"><span>...</span></li>
        {% endif %}
        {% endfor %}

        {% if list.has_next %}
        <li class="next_page"><a href="?page={{list.next_page_number}}">下一页</a></li>
        {% else %}
        <li class="prev_page"></li>
        {% endif %}
    </ul>
</div>


{% comment %}
你可能感兴趣
{% endcomment %}
<ul>
    {% for h in hot %}
    <li>
        <div class="">
            <a href="{% url 'index'  %}show-{{h.id}}.html" title={{h.title}}>
                <img src="{% url 'index' %}media/{{h.img}}"
                     srcset="{% url 'index' %}media/{{h.img}}" alt="{{h.title}}" class="" width="145" height="100"/></a>
        </div>
        <a class="descript" href="{% url 'index' %}show-{{h.id}}.html" rel="bookmark"
           title="{{h.title}}">{{h.title}}</a>
    </li>
    {% endfor %}
</ul>
{% endblock %}
                
    
        
